<!DOCTYPE html>
<html>
<head>
    {include file='public/meta'/}
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/bootstrap-table/bootstrap-table.css"/>
    <script src="__STATIC_URL__/static/bootstrap-table/bootstrap-table.js"></script>
    <script src="__STATIC_URL__/static/bootstrap-table/bootstrap-table-zh-CN.js"></script>
    <style>
        thead tr th {
            text-align: center;
        }

        tbody tr td {
            text-align: center;
        }
    </style>
</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section id="content">
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">
        <div class="page-heading mgl15 mgr15">
            <ul class="breadcrumb">
                <li>当前位置是&nbsp;:</li>
                <li>&nbsp;<a href="#">礼品卡管理</a></li>
                <li class="active" style="color: #02b87f;">购买记录</li>
            </ul>
        </div>
        <div class="panel panel-search panel-default mgl15 mgr15">
            <div class="panel-heading">
                <h3 class="panel-title">
                    筛选
                </h3>
            </div>
            <div class="panel-body">
                <form action="" method="get" class="form-horizontal table-search form-search" role="form" id="machform">
                    <div class="col-sm-6 col-md-6 col-lg-4 ">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">订单号：</label>
                            <div class="col-sm-9">
                                <!--oninput="getDatas(this.value)" onkeydown="searchkeydown(event,'merchant')"-->
                                <input type="text" class="form-control"autocomplete="off" disableautocomplete id="code" placeholder="请输入订单号" value="" name="orderid">
                                <div class="searchlist hide">
                                    <ul>

                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>

                </form>
            </div>
            <div class="panel-footer">
                <a href="javascript:;" class="btn btn-primary" onclick="searchform()">查找</a>
                <a href="javascript:;" class="btn btn-default" onclick="clearform()">清空</a>
            </div>
        </div>
        <div class="panel mgl15 mgr15">

            <div class="panel-heading addCharts" style="background:#ededed;">领取记录列表</div>
            <div class="panel-body">
                <table class="table table-bordered" data-toolbar="#toolbar" id="tablelist">

                </table>

            </div>
        </div>
        {include file='public/footer'/}
    </div>
</section>

<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">礼品卡详情</h4>
            </div>
            <div class="modal-body" id="body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</body>
<script src="__STATIC_URL__/static/js/commen.js" type="text/javascript" charset="utf-8"></script>
<script src="__STATIC_URL__/static/layer/layer.js" type="text/javascript" charset="utf-8"></script>
<script src="/wntable.js"></script>

<script>

    $(function () {
        var type = "cardgiftpaylist";
        var url = "{:url()}";
        getcolumn(type, url, "tablelist")
    });
    function searchform() {
        $("#tablelist" ).bootstrapTable('refresh');
    }
</script>

<script>
    function show(obj){
        var cardid=$(obj).attr("data-card");
        $.ajax({
            url: "{:url('cardgiftstest/getpaycardgifts')}",
            data: {
                id:cardid
            },
            dataType: "json",
            type: "post",
            success: function (res) {
                console.log(res);
                $("#body").html(res);
                $('#myModal').modal('show')

            }
        })

    }
</script>

</html>
